package com.chenss.dragonserapp.app;

import android.support.v4.util.ArrayMap;
import com.chenss.dragonserapp.utils.Md5;

/**
 * 常量配置
 */

public class Constant {
    /**
     * 应用加密key
     */
    public static String secretKey="O]dWJ,[*g)%k\"?q~g6Co!`cQvV>>Ilvw";

    //域名
//    public static final String HOST = "http://nzm.shiningsoft.top";
    public static final String HOST = "http://nongzhangmen.cn:8911";//正式
    public static final String serverPath = HOST+"/api";


    /**
     * 模块
     *
     */
    public static class App {
        public static String  Store = "Store";

        public static String  Goods = "Goods";
        public static String  Order = "Order";//订单

        public static String  System ="System";
        public static String  Coupon ="Coupon";

        public static String Wallet ="Wallet";
        public static String Cas ="Cas";
        public static String Security ="Security";


    }

    /**
     * 接口名
     *
     */
    public static class classes {
        /**
         * 登录
         */
        public static final String  StoreLogin= "StoreLogin";
        /**
         * 验证验证码
         */
        public static final String  Cas_an_CheckCode= "Cas_an_CheckCode";

  /**
         * 获取验证码
         */
        public static final String  Cas_an_UserPhoneCode= "Cas_an_UserPhoneCode";


        /**
         * 忘记密码
         */
        public static final String  StoreForgetPassword = "StoreForgetPassword";

        /**
         * 修改密码
         */
        public static final String  StoreChangePwd = "StoreChangePwd";

        /**
         * 获取服务站信息
         */
        public static final String  GetStoreInfo= "GetStoreInfo";

        /**
         * 产品管理
         */
        public static final String  GetGoodsListStore = "GetGoodsListStore";
       /**
         * 产品库存列表
         */
        public static final String  SecurityanStoreSecurityList = "Security_an_StoreSecurityList";

        /**
         * 删除产品库存列表
         */
        public static final String  SecurityanUpdateStoreSecurity = "Security_an_UpdateStoreSecurity";


        /**
         * 领券中心列表
         */
        public static final String AllList = "AllList";

        /**
         * 领取优惠券
         */
        public static final String  GetCoupon = "GetCoupon";

        /**
         * 我的优惠券列表
         */
        public static final String  MyList = "MyList";

        /**
         * 收支明细
         */
        public static final String  StoreLog = "StoreLog";
/**
         * 订单列表
         */
        public static final String  Order_an_ServeOrderList = "Order_an_ServeOrderList";
    /**
         * 同意退换货
         */
        public static final String  Order_an_UpdateReturnState = "Order_an_UpdateReturnState";

    /**
         * 订单详情
         */
        public static final String  Order_an_OrderInfo = "Order_an_OrderInfo";
   /**
         * 用户消费过的优惠券
         */
        public static final String  Store_an_StoreCumulativeCoupon = "Store_an_StoreCumulativeCoupon";


        /**
         * 退货列表
         */
        public static final String  Order_an_ServeReturnGoodsList = "Order_an_ServeReturnGoodsList";
        /**
         * 确认发货
         */
        public static final String  Order_an_ServeOrderConfirm = "Order_an_ServeOrderConfirm";
   /**
         * 退货详情
         */
        public static final String  Order_an_ReturnGoodsInfo = "Order_an_ReturnGoodsInfo";



        /**
         * 支付宝提现
         */
        public static final String  System_an_ALiPaymentCash = "System_an_ALiPaymentCash";
  /**
         * 直接下单扫码支付获取支付状态
         */
        public static final String  Order_an_Paystate = "Order_an_Paystate";
/**
         * 微信密钥返回
         */
        public static final String  System_an_TXunWechat = "System_an_TXunWechat";

/**
         * 微信提现接口
         */
        public static final String  System_an_TXunWechatCash = "System_an_TXunWechatCash";


    }

    /**
     * 网络请求必要参数对应ActionId
     *
     */
    public static class Actionid {
        public static final int NETWORK_REQUEST_CODE_1 = 1;
        public static final int NETWORK_REQUEST_CODE_2 = 2;
        public static final int NETWORK_REQUEST_CODE_3 = 3;
        public static final int NETWORK_REQUEST_CODE_4 = 4;
        public static final int NETWORK_REQUEST_CODE_5 = 5;

    }

    /**
     * 设置公共的一些必要参数
     *
     * @param params
     * @param app
     * @param clazz
     */
    public static void setCommonParams(ArrayMap<String,String> params, String app, String clazz) {
        params.put("app", app);
        params.put("class", clazz);
        params.put("sign", Md5.GetMD5Code(app + clazz + secretKey));
    }
}
